<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OrangeCNC - ARISC firmware documentation: mod_encoder.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">OrangeCNC - ARISC firmware documentation
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('mod__encoder_8c.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">mod_encoder.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>quadrature encoder counter module  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="mod__gpio_8h_source.html">mod_gpio.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="mod__encoder_8h_source.html">mod_encoder.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a3e267babdd4cad47d79ea2dc77e05d22"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mod__encoder_8c.html#a3e267babdd4cad47d79ea2dc77e05d22">encoder_module_init</a> ()</td></tr>
<tr class="memdesc:a3e267babdd4cad47d79ea2dc77e05d22"><td class="mdescLeft">&#160;</td><td class="mdescRight">module init  <a href="#a3e267babdd4cad47d79ea2dc77e05d22">More...</a><br /></td></tr>
<tr class="separator:a3e267babdd4cad47d79ea2dc77e05d22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac45cc4e8609d98b53513be7d101e2e92"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mod__encoder_8c.html#ac45cc4e8609d98b53513be7d101e2e92">encoder_module_base_thread</a> ()</td></tr>
<tr class="memdesc:ac45cc4e8609d98b53513be7d101e2e92"><td class="mdescLeft">&#160;</td><td class="mdescRight">module base thread  <a href="#ac45cc4e8609d98b53513be7d101e2e92">More...</a><br /></td></tr>
<tr class="separator:ac45cc4e8609d98b53513be7d101e2e92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9c08aae4548498e0ef296e28ff95139"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mod__encoder_8c.html#aa9c08aae4548498e0ef296e28ff95139">encoder_pin_setup</a> (uint8_t c, uint8_t phase, uint8_t port, uint8_t pin)</td></tr>
<tr class="memdesc:aa9c08aae4548498e0ef296e28ff95139"><td class="mdescLeft">&#160;</td><td class="mdescRight">setup encoder pin for the selected channel and phase  <a href="#aa9c08aae4548498e0ef296e28ff95139">More...</a><br /></td></tr>
<tr class="separator:aa9c08aae4548498e0ef296e28ff95139"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab19f3851f6b2768f91e08d066f15fa0c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mod__encoder_8c.html#ab19f3851f6b2768f91e08d066f15fa0c">encoder_setup</a> (uint8_t c, uint8_t using_B, uint8_t using_Z)</td></tr>
<tr class="memdesc:ab19f3851f6b2768f91e08d066f15fa0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">setup selected channel of encoder counter  <a href="#ab19f3851f6b2768f91e08d066f15fa0c">More...</a><br /></td></tr>
<tr class="separator:ab19f3851f6b2768f91e08d066f15fa0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c121071467f9a1943fddc473873b7ed"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mod__encoder_8c.html#a1c121071467f9a1943fddc473873b7ed">encoder_state_set</a> (uint8_t c, uint8_t state)</td></tr>
<tr class="memdesc:a1c121071467f9a1943fddc473873b7ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">enable/disable selected channel of encoder counter  <a href="#a1c121071467f9a1943fddc473873b7ed">More...</a><br /></td></tr>
<tr class="separator:a1c121071467f9a1943fddc473873b7ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e82c8d10ee1a0ef53521a8c7d4a0e23"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mod__encoder_8c.html#a0e82c8d10ee1a0ef53521a8c7d4a0e23">encoder_counts_set</a> (uint8_t c, int32_t counts)</td></tr>
<tr class="memdesc:a0e82c8d10ee1a0ef53521a8c7d4a0e23"><td class="mdescLeft">&#160;</td><td class="mdescRight">change number of counts for the selected channel  <a href="#a0e82c8d10ee1a0ef53521a8c7d4a0e23">More...</a><br /></td></tr>
<tr class="separator:a0e82c8d10ee1a0ef53521a8c7d4a0e23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a377ac7de3373ddb7f8410560a2b7ad95"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mod__encoder_8c.html#a377ac7de3373ddb7f8410560a2b7ad95">encoder_state_get</a> (uint8_t c)</td></tr>
<tr class="memdesc:a377ac7de3373ddb7f8410560a2b7ad95"><td class="mdescLeft">&#160;</td><td class="mdescRight">get state for the selected channel  <a href="#a377ac7de3373ddb7f8410560a2b7ad95">More...</a><br /></td></tr>
<tr class="separator:a377ac7de3373ddb7f8410560a2b7ad95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a288e61e725e822b6827ff2052ad38c63"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mod__encoder_8c.html#a288e61e725e822b6827ff2052ad38c63">encoder_counts_get</a> (uint8_t c)</td></tr>
<tr class="memdesc:a288e61e725e822b6827ff2052ad38c63"><td class="mdescLeft">&#160;</td><td class="mdescRight">get current counts for the selected channel  <a href="#a288e61e725e822b6827ff2052ad38c63">More...</a><br /></td></tr>
<tr class="separator:a288e61e725e822b6827ff2052ad38c63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3416779bfce857e32d619f9cb039138a"><td class="memItemLeft" align="right" valign="top">int8_t volatile&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mod__encoder_8c.html#a3416779bfce857e32d619f9cb039138a">encoder_msg_recv</a> (uint8_t type, uint8_t *msg, uint8_t length)</td></tr>
<tr class="memdesc:a3416779bfce857e32d619f9cb039138a"><td class="mdescLeft">&#160;</td><td class="mdescRight">"message received" callback  <a href="#a3416779bfce857e32d619f9cb039138a">More...</a><br /></td></tr>
<tr class="separator:a3416779bfce857e32d619f9cb039138a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a4c7ffa9d73e9b28219932f5a05140099"><td class="memItemLeft" align="right" valign="top">volatile uint32_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mod__encoder_8c.html#a4c7ffa9d73e9b28219932f5a05140099">gpio_port_data</a> [<a class="el" href="mod__gpio_8h.html#a188c33baad9a9f4dffd2ed5040b274c7">GPIO_PORTS_CNT</a>]</td></tr>
<tr class="separator:a4c7ffa9d73e9b28219932f5a05140099"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>quadrature encoder counter module </p>
<p>This module implements an API to make real-time counting of quadrature encoder pulses </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a3e267babdd4cad47d79ea2dc77e05d22"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e267babdd4cad47d79ea2dc77e05d22">&#9670;&nbsp;</a></span>encoder_module_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void encoder_module_init </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>module init </p>
<dl class="section note"><dt>Note</dt><dd>call this function only once before <a class="el" href="mod__encoder_8c.html#ac45cc4e8609d98b53513be7d101e2e92" title="module base thread ">encoder_module_base_thread()</a> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mod_encoder_8c-example.html#a1">mod_encoder.c</a>.</dd>
</dl>
</div>
</div>
<a id="ac45cc4e8609d98b53513be7d101e2e92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac45cc4e8609d98b53513be7d101e2e92">&#9670;&nbsp;</a></span>encoder_module_base_thread()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void encoder_module_base_thread </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>module base thread </p>
<dl class="section note"><dt>Note</dt><dd>call this function anywhere in the main loop </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mod_encoder_8c-example.html#a12">mod_encoder.c</a>.</dd>
</dl>
</div>
</div>
<a id="aa9c08aae4548498e0ef296e28ff95139"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa9c08aae4548498e0ef296e28ff95139">&#9670;&nbsp;</a></span>encoder_pin_setup()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void encoder_pin_setup </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>phase</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>setup encoder pin for the selected channel and phase </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>channel id </td></tr>
    <tr><td class="paramname">phase</td><td>PHASE_A..PHASE_Z </td></tr>
    <tr><td class="paramname">port</td><td>GPIO port number </td></tr>
    <tr><td class="paramname">pin</td><td>GPIO pin number</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mod_encoder_8c-example.html#a2">mod_encoder.c</a>.</dd>
</dl>
</div>
</div>
<a id="ab19f3851f6b2768f91e08d066f15fa0c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab19f3851f6b2768f91e08d066f15fa0c">&#9670;&nbsp;</a></span>encoder_setup()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void encoder_setup </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>using_B</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>using_Z</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>setup selected channel of encoder counter </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>channel id </td></tr>
    <tr><td class="paramname">using_B</td><td>use phase B input? </td></tr>
    <tr><td class="paramname">using_Z</td><td>use phase Z index input?</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mod_encoder_8c-example.html#a7">mod_encoder.c</a>.</dd>
</dl>
</div>
</div>
<a id="a1c121071467f9a1943fddc473873b7ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1c121071467f9a1943fddc473873b7ed">&#9670;&nbsp;</a></span>encoder_state_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void encoder_state_set </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>state</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>enable/disable selected channel of encoder counter </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>channel id </td></tr>
    <tr><td class="paramname">state</td><td>0 = disable, !0 = enable </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mod_encoder_8c-example.html#a11">mod_encoder.c</a>.</dd>
</dl>
</div>
</div>
<a id="a0e82c8d10ee1a0ef53521a8c7d4a0e23"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e82c8d10ee1a0ef53521a8c7d4a0e23">&#9670;&nbsp;</a></span>encoder_counts_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void encoder_counts_set </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>counts</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>change number of counts for the selected channel </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>channel id </td></tr>
    <tr><td class="paramname">counts</td><td>new value for encoder channel counts </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mod_encoder_8c-example.html#a9">mod_encoder.c</a>.</dd>
</dl>
</div>
</div>
<a id="a377ac7de3373ddb7f8410560a2b7ad95"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a377ac7de3373ddb7f8410560a2b7ad95">&#9670;&nbsp;</a></span>encoder_state_get()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t encoder_state_get </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>get state for the selected channel </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>channel id</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>(channel is disabled) </td></tr>
    <tr><td class="paramname">1</td><td>(channel is enabled) </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mod_encoder_8c-example.html#a10">mod_encoder.c</a>.</dd>
</dl>
</div>
</div>
<a id="a288e61e725e822b6827ff2052ad38c63"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a288e61e725e822b6827ff2052ad38c63">&#9670;&nbsp;</a></span>encoder_counts_get()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t encoder_counts_get </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>get current counts for the selected channel </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>channel id </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">signed</td><td>32-bit number </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="mod_encoder_8c-example.html#a8">mod_encoder.c</a>.</dd>
</dl>
</div>
</div>
<a id="a3416779bfce857e32d619f9cb039138a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3416779bfce857e32d619f9cb039138a">&#9670;&nbsp;</a></span>encoder_msg_recv()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int8_t volatile encoder_msg_recv </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>msg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>"message received" callback </p>
<dl class="section note"><dt>Note</dt><dd>this function will be called automatically when a new message will arrive for this module.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>user defined message type (0..0xFF) </td></tr>
    <tr><td class="paramname">msg</td><td>pointer to the message buffer </td></tr>
    <tr><td class="paramname">length</td><td>the length of a message (0 .. MSG_LEN)</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">0</td><td>(message read) </td></tr>
    <tr><td class="paramname">-1</td><td>(message not read) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a4c7ffa9d73e9b28219932f5a05140099"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c7ffa9d73e9b28219932f5a05140099">&#9670;&nbsp;</a></span>gpio_port_data</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile uint32_t* gpio_port_data[<a class="el" href="mod__gpio_8h.html#a188c33baad9a9f4dffd2ed5040b274c7">GPIO_PORTS_CNT</a>]</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="mod__encoder_8c.html">mod_encoder.c</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
